Skip to content

Conversation

@fpistm
Copy link
Member

@fpistm fpistm commented Nov 17, 2025

Fixes #109

Search hardened by filtering with device type, only removable device are considered.

Fixes stm32duino#109

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
@fpistm fpistm added this to the 2.3.2/2.4.0 milestone Nov 17, 2025
@fpistm fpistm requested review from Aymane-ST and Copilot November 17, 2025 15:47
@fpistm fpistm added the fix 🩹 Bug fix label Nov 17, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces the deprecated WMIC command with a PowerShell equivalent for detecting USB mass storage devices by volume name on Windows systems.

Key Changes:

  • Replaced WMIC LOGICALDISK query with PowerShell's Get-CimInstance cmdlet
  • Simplified the logic by removing intermediate variable assignments
  • Updated the command to filter for removable drives (DriveType = 2)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@Aymane-ST Aymane-ST left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on Windows 11. LGTM.

@fpistm fpistm merged commit 6a7e5d3 into stm32duino:main Nov 18, 2025
@fpistm fpistm deleted the wmic branch November 18, 2025 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix 🩹 Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mass storage upload method silently failed if WMIC is not enabled

2 participants